import service from '@/utils/request'

export function getDepartments(data) {
  return service({
    url: '/company/department'
  })
}
export function delDepartments(id) {
  return service({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
export function addDepartments(data) {
  return service({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门信息
export function getDepartDetail(id) {
  return service({
    url: `/company/department/${id}`
  })
}
// 新增部門信息
export function updateDepartments(data) {
  return service({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
